<template>
  <el-card class="el-header">
    资源动态
  </el-card>
  <el-card style="margin-top: 10px">
    <el-form>
      <el-form :inline="true" class="">
        <el-form-item>
          <el-input :prefix-icon="Search" class="myInput" v-model="searchText"/>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" size="small" @click="MySearch">搜索</el-button>
        </el-form-item>
        <el-form-item label="资源类型">
          <el-select v-model="selectorId.one" placeholder="全部资源">
            <el-option v-for="item in myResources" :label="item" :value="item"/>
          </el-select>
        </el-form-item>
        <el-form-item label="状态">
          <el-select v-model="selectorId.two" placeholder="状态">
            <el-option v-for="item in myState" :label="item" :value="item"/>
          </el-select>
        </el-form-item>
      </el-form>
    </el-form>
    <el-table aria-placeholder="" style="height: 90vh;">
      <el-table-column align="center" prop="date" label="内容" width="auto"/>
      <el-table-column align="center" prop="name" label="发布时间" width="150"/>
      <el-table-column align="center" prop="address" label="数据" width="150"/>
      <el-table-column align="center" prop="address" label="状态" width="150"/>
      <el-table-column align="center" prop="address" label="操作" width="150"/>
    </el-table>
  </el-card>
</template>

<script setup lang="ts">
import {reactive, ref} from 'vue'
import {Search} from '@element-plus/icons-vue'

const searchText = ref('')
const selectorId = reactive({
  one: '',
  two: ''
})

const myResources = ref(['全部资源', '作品', '教程', '动态']);
const myState = ref(['全部', '已发布', '未发布', '审核中', '审核未通过', '仅主页可见']);

//功能：1.请求接口拿数据 2.刷新页面列表渲染
//传参：列表selectorId
const getMyTable = async (id:Number) => {

}
//功能：1.
const MySearch = async () => {

}

</script>

<style scoped>


</style>
